package com.warrior.respository;

import com.warrior.entity.ActivityEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Shawn on 2017/3/16.
 */
@Repository
public interface IActivityRepository extends JpaRepository<ActivityEntity, String>, PagingAndSortingRepository<ActivityEntity, String> {

    ActivityEntity findActivityEntityById(String id);

    List<ActivityEntity> findRecommendByIsRecommend(int recommend);

    Page<ActivityEntity> findActivityByActivityType(int type,Pageable pageable);

}
